<template>
  <div>
    <el-button ref='test' type="primary" @click="clickRef()">父组件</el-button>
    <child ref="child"></child>

  </div>

</template>


<script>
import child from './childTemplate'
export default {

  data () {
    return {
      test: "999999"
    }
  },

  methods: {
    clickRef () {
      //   this.$message({
      //     message: this.$refs.child.getTest(),
      //     type: 'success',
      //   });
      console.log(11111111)

      //   this.$message({
      //     message: this.$children[1].getTest(),
      //     type: 'success',
      //   });
    }
  },



  components: {
    child
  },

  mounted () {
    console.log()
  }

}
</script>

<style scoped>
</style>